/*renderBlog = strand(function () {						*/renderBlog=function(){var blog,_cp=1;var _f=_frm(arguments);return _f.clsr(function(){_s:while(1){switch(_cp){case 1:_cp=2;case 2:if((_f.v2=
/*	var blog = yield (yield (yield pjs.load("root")).examples).blog; // get the blog object, the list of the postings						*/pjs.load("root"))===_S){break _s;}_cp=3;case 3:if((_f.v3=_g((_f.v2),"examples"))===_S){break _s;}_cp=4;case 4:if((_f.v4=_g((_f.v3),"blog"))===_S){break _s;}blog=_f.v4;_p(
/*	document.getElementById('newPost').style.display='none';						*/document.getElementById("newPost").style,"display","none");
/*	blogElement = document.getElementById("blogDiv");						*/blogElement=document.getElementById("blogDiv");_p(
/*	blogElement.innerHTML = ""; // clear it out						*/blogElement,"innerHTML","");
/*	Array.forEach(blog,function(post) { // iterate through the blog posts, we could use a for loop if we wanted						*/Array.forEach(blog,function(post){
/*				renderPost(post,blogElement.appendChild(document.createElement('div'))); // render each post in a new div						*/renderPost(post,blogElement.appendChild(document.createElement("div")));});return;}}return _f.sus(this)}).call(this)};
/*	});						*/
/*});						*/
/*renderPost = strand(function(post,postDiv,withComments) {						*/renderPost=function(post,postDiv,withComments){var i,html,comment,_cp=1;var _f=_frm(arguments);return _f.clsr(function(){_s:while(1){switch(_cp){case 1:_cp=2;case 2:if((_f.v2=_g(
/*	// we will assume that the post has lazy loading, but the comments don't						*/
/*	var html = "<h2>" + (yield post.title) + "</h2>" 						*/post,"title"))===_S){break _s;}_cp=3;case 3:if((_f.v3=_g(
/*		+ "<h4>" + (yield post.created) + "</h4><p>" + (yield post.content) + "</p>"; 						*/post,"created"))===_S){break _s;}_cp=4;case 4:if((_f.v4=_g(post,"content"))===_S){break _s;}html="<h2>"+(_f.v2)+"</h2>"+"<h4>"+(_f.v3)+"</h4><p>"+(_f.v4)+"</p>";
/*	if (withComments) {						*/_cp=(withComments)?5:6;break;case 5:_cp=7;case 7:if((_f.v7=_g(
/*		for (var i = 0; i < (yield post.comments).length; i++) { // we could use Array.forEach instead						*/post,"comments"))===_S){break _s;}_cp=8;case 8:if((_f.v8=_g((_f.v7),"length"))===_S){break _s;}for(i=0;i<_f.v8;i++){
/*			var comment = post.comments[i];						*/comment=post.comments[i];
/*			html += "<div class='comment'>" + comment.content + "</div><div class='author'>" 						*/html+="<div class='comment'>"+comment.content+"</div><div class='author'>"
/*				+ comment.author + " on " + comment.created + "</div>";						*/+comment.author+" on "+comment.created+"</div>";}_cp=6;break;case 6:_p(
/*		}						*/
/*	}						*/
/*	document.getElementById('newComment').style.display=withComments ? 'block' : 'none';						*/document.getElementById("newComment").style,"display",withComments?"block":"none");_p(
/*	postDiv.innerHTML = html;						*/postDiv,"innerHTML",html);_p(
/*	postDiv.onclick = function() {						*/postDiv,"onclick",function(){
/*		renderPost(post,blogElement,true);						*/renderPost(post,blogElement,true);
/*		currentPost = post;						*/currentPost=post;});_p(
/*	}						*/
/*	postDiv.className="post";						*/postDiv,"className","post");return;}}return _f.sus(this)}).call(this)};
/*});						*/
/*function addBlogPost() {						*/function addBlogPost(){
/*	var blog = pjs.load("root").examples.blog; // we know this has already been loaded, so we won't worry about lazy loading						*/var blog=pjs.load("root").examples.blog;
/*	var newPost = {						*/var newPost={
/*		title : prompt("What would you like to title the new post?","new title"),						*/title:prompt("What would you like to title the new post?","new title"),
/*		content : document.getElementById('newPostContent').value,						*/content:document.getElementById("newPostContent").value,
/*		created : new Date(),						*/created:new Date,
/*		comments : [] // an empty array of comments						*/comments:[]};
/*	};						*/
/*	blog.unshift(newPost); // add a new post to the top of the array using standard array functions						*/blog.unshift(newPost);
/* 	renderBlog();						*/renderBlog();}

/*}						*/
/*function addCommentEntry() {						*/function addCommentEntry(){
/*	var commentsDiv = document.getElementById("newComment")						*/var commentsDiv=document.getElementById("newComment");
/*	currentPost.comments.push({						*/currentPost.comments.push({
/*		author : document.getElementById('newCommentAuthor').value,						*/author:document.getElementById("newCommentAuthor").value,
/*		content : document.getElementById('newCommentContent').value,						*/content:document.getElementById("newCommentContent").value,
/*		created : new Date()						*/created:new Date}
/*	});						*/);
/*	renderPost(currentPost,blogElement,true);						*/renderPost(currentPost,blogElement,true);}
/*}						*/
/*renderBlog();						*/renderBlog();

